package io.github.rascaler.dcenter.ws.message;

import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @ClassName SocketMessage
 * @Description TODO
 * @Author wurenqing
 * @Date 2022/5/26 9:23
 */
@Data
@ToString(callSuper = true)
public class SocketMessage<T extends SocketMessagePayload> implements Serializable {

    private String path;

    private String id;

    private Long timestamp;

    // 其他消息头
    private Map<String,String> headers = new HashMap<>();

    // 消息体
    private T payload;
}
